<template>
<div class="demo-pagination-block">
    <el-pagination
      v-model:current-page="dataMap.currentPage"
      v-model:page-size="dataMap.pageSize"
      :page-sizes="[10,20,40,60,80,100]"
      :small="small"
      :disabled="disabled"
      :background="background"
      layout="total, sizes, prev, pager, next, jumper"
      :total="totalNum"
      @update:current-page="handleChangePage"
      @update:page-size="handleChangePageSize"
      />
</div>
</template>
<script setup>
import {reactive} from 'vue'

let dataMap = reactive({
    currentPage:1,
    pageSize:10
});
const props = defineProps({
    totalNum:{
      type:Number,
      default:()=>{
        return 0;
      }
    },
})
const emit = defineEmits(['getPageParams']);
const handleChangePage = ()=>{
    emit('getPageParams',dataMap)
}
const handleChangePageSize = ()=>{
    emit('getPageParams',dataMap)
}
</script>
<style lang="scss" scoped>
</style>